CN116032737A - Service resource processing method and device - Google Patents

Service resource processing method and device Download PDF

Info

Publication number
CN116032737A
CN116032737A CN202211578098.XA CN202211578098A CN116032737A CN 116032737 A CN116032737 A CN 116032737A CN 202211578098 A CN202211578098 A CN 202211578098A CN 116032737 A CN116032737 A CN 116032737A
Authority
CN
China
Prior art keywords
resource
service
target management
calling
management interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211578098.XA
Other languages
Chinese (zh)
Inventor
陈昱良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202211578098.XA priority Critical patent/CN116032737A/en
Publication of CN116032737A publication Critical patent/CN116032737A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for processing service resources, and relates to the technical field of cloud computing. One embodiment of the method comprises the following steps: monitoring service resource use conditions of an enterprise service bus; under the condition that the use condition meets one or more preset early warning conditions, determining a target management section to which the use condition belongs from one or more preset management sections; and calling one or more resource processing strategies corresponding to the target management interval to process the service resource. The embodiment of the invention improves the real-time performance and the automation degree of service resource processing, and improves the refinement degree of service resource processing by processing the service resources through a plurality of preset management intervals and a plurality of corresponding resource processing strategies.

Description

Service resource processing method and device
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for service resource processing.
Background
Internet applications typically include an enterprise service bus (Enterprise Service Bus, abbreviated as ESB) that provides services, which is a bus system that provides the most basic connection hub in the network, and provides services such as network connection between different services and large-scale data interaction for the internet application, so that managing and maintaining the stability and availability of the enterprise service bus is critical to the internet application.
The existing method for managing and maintaining the enterprise service bus generally requires a professional to manually change system parameters related to service resources after evaluation when judging that the service resources in the enterprise service bus are abnormal, and to restart the system after the parameters are changed so as to enable the changed parameters to be effective; the existing method for managing and maintaining the enterprise service bus has the problems of poor universality, low instantaneity and low automation degree.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method and an apparatus for processing service resources, which can monitor the service resource usage condition of an enterprise service bus; under the condition that the use condition meets one or more preset early warning conditions, determining a target management section to which the use condition belongs from one or more preset management sections; and calling one or more resource processing strategies corresponding to the target management interval to process the service resource. The embodiment of the invention improves the real-time performance and the automation degree of service resource processing, and improves the refinement degree of service resource processing by processing the service resources through a plurality of preset management intervals and a plurality of corresponding resource processing strategies.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for service resource processing, including: monitoring service resource use conditions of an enterprise service bus; under the condition that the use condition meets one or more preset early warning conditions, determining the use rate of the service resource, and searching a target management interval to which the use rate belongs from one or more preset management intervals corresponding to each early warning condition; and calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
Optionally, the processing policy for the resource includes: the first resource regulation and control program is configured to shorten a free time length of one or more network connections, so that service resources occupied by the network connections are released in advance, and the calling one or more resource processing policies corresponding to the target management interval to process the service resources includes: and calling the first resource regulation program to generate a shortened idle time for the target management interval so as to release occupied service resources according to the shortened idle time.
Optionally, the generating the shortened idle time includes: and under the condition that the maximum value of the target management interval is smaller than a resource saturation threshold, calculating the shortened idle time by using the utilization rate of the service resource, the maximum value of the target management interval, the minimum value of the target management interval, the preset idle time minimum value and the preset idle time default value.
Optionally, the generating the shortened idle time further includes: and under the condition that the minimum value of the target management interval is larger than or equal to the resource saturation threshold, directly determining the preset minimum value of the idle time as the shortened idle time.
Optionally, the processing policy for the resource includes: a second resource regulation program that reclaims resources occupied by one or more sessions; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the second resource regulation program to generate a session resource threshold for the target management interval, and recovering each session of which the occupied resource exceeds the session resource threshold so as to release the occupied service resource.
Optionally, the generating the session resource threshold includes: and calculating a session resource threshold by using the utilization rate of the service resource, the maximum value of the target management interval and the minimum value of the target management interval.
Optionally, the managing resource policy includes: stopping a third resource regulation program for processing one or more service requests; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the third resource regulating program to directly return an abnormal response code to the received one or more new service requests, or calling the third resource regulating program to stop monitoring the service data of the one or more service requests in processing so as to ensure that the service resources occupied by service data scheduling are not increased.
Optionally, the managing resource policy includes: sending a message for suspending the service request to a fourth resource regulation program of one or more service request terminals; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: calling the fourth resource regulation program to send a message for suspending the service request to one or more service request terminals; and stopping sending the service request by one or more service request terminals according to the received message for suspending the service request, so that the service resources occupied by the service request scheduling are not increased.
To achieve the above object, according to a second aspect of the embodiments of the present invention, there is provided an apparatus for service resource processing, including: monitoring a resource module, determining a strategy module and managing the resource module;
the monitoring resource module is used for monitoring the service resource service condition of the enterprise service bus;
the determining policy module is configured to determine, when the usage condition meets one or more preset early warning conditions, a usage rate of the service resource, and find, from one or more preset management intervals corresponding to each of the early warning conditions, a target management interval to which the usage rate value belongs;
and the management resource module is used for calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
Optionally, the service resource processing device is configured to, for the resource processing policy, include: the first resource regulation and control program is configured to shorten a free time length of one or more network connections, so that service resources occupied by the network connections are released in advance, and the calling one or more resource processing policies corresponding to the target management interval to process the service resources includes: and calling the first resource regulation program to generate a shortened idle time for the target management interval so as to release occupied service resources according to the shortened idle time.
Optionally, the service resource processing device is configured to generate a shortened idle duration, and includes: and under the condition that the maximum value of the target management interval is smaller than a resource saturation threshold, calculating the shortened idle time by using the utilization rate of the service resource, the maximum value of the target management interval, the minimum value of the target management interval, the preset idle time minimum value and the preset idle time default value.
Optionally, the service resource processing device is configured to generate a shortened idle duration, and further includes: and under the condition that the minimum value of the target management interval is larger than or equal to the resource saturation threshold, directly determining the preset minimum value of the idle time as the shortened idle time.
Optionally, the service resource processing device is configured to, for the resource processing policy, include: a second resource regulation program that reclaims resources occupied by one or more sessions; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the second resource regulation program to generate a session resource threshold for the target management interval, and recovering each session of which the occupied resource exceeds the session resource threshold so as to release the occupied service resource.
Optionally, the service resource processing device is configured to generate a session resource threshold, and includes: and calculating a session resource threshold by using the utilization rate of the service resource, the maximum value of the target management interval and the minimum value of the target management interval.
Optionally, the service resource processing device is configured to, for the management resource policy, include: stopping a third resource regulation program for processing one or more service requests; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the third resource regulating program to directly return an abnormal response code to the received one or more new service requests, or calling the third resource regulating program to stop monitoring the service data of the one or more service requests in processing so as to ensure that the service resources occupied by service data scheduling are not increased.
Optionally, the service resource processing device is configured to, for the management resource policy, include: sending a message for suspending the service request to a fourth resource regulation program of one or more service request terminals; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: calling the fourth resource regulation program to send a message for suspending the service request to one or more service request terminals; and stopping sending the service request by one or more service request terminals according to the received message for suspending the service request, so that the service resources occupied by the service request scheduling are not increased.
To achieve the above object, according to a third aspect of an embodiment of the present invention, there is provided an electronic device for service resource processing, including: one or more processors; and a storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the methods of service resource processing described above.
To achieve the above object, according to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements a method as described in any one of the above methods of service resource processing.
One embodiment of the above invention has the following advantages or benefits: the service resource use condition of the enterprise service bus can be monitored; under the condition that the use condition meets one or more preset early warning conditions, determining a target management section to which the use condition belongs from one or more preset management sections; and calling one or more resource processing strategies corresponding to the target management interval to process the service resource. The embodiment of the invention improves the real-time performance and the automation degree of service resource processing, and improves the refinement degree of service resource processing by processing the service resources through a plurality of preset management intervals and a plurality of corresponding resource processing strategies.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a flow diagram of a method for service resource handling according to one embodiment of the present invention;
FIG. 2 is a schematic diagram of a service resource processing flow according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for service resource processing according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An enterprise service bus (Enterprise Service Bus, ESB) system is used as a bus system to provide the most basic connection hub in the network and to form the necessary elements in the enterprise nervous system. There may be situations in which a large concurrent client requests services from the ESB platform during operation of the ESB system, and service resource overload occurs, typically by system parameters configured by the ESB system, other policy or policies triggering overload protection, or service degradation. Existing ESBs are configured by providing system parameters such as: maximum number of requestor connections, maximum requestor connection timeout time, maximum number of forwarding connections, maximum forwarding connection timeout time, etc. Existing ESB system parameters cannot be dynamically adjusted, such as: the maximum number of requested connections, the maximum number of requested connections timeout, the maximum number of forwarding connections timeout parameters, and if one or more system parameters are adjusted, the system can only be restarted. The existing ESB system does not consider the influence of network environment and dynamic basic setting on ESB overload protection, such as network response delay and calculation of resource load critical values, so that the ESB cannot enable services to adapt to the actual production environments such as rolling upgrade, dynamic infrastructure, network faults and the like. In addition, the ESB overload protection parameters can be set after the actual requirements of the requester and the performance parameters of the provider are evaluated, and if the actual conditions and the evaluation are inaccurate, the performance of the ESB for providing the service can be limited or the overload protection cannot be triggered. Since the infrastructure of operating ESBs tends to vary widely, the operations and management personnel may not be able to accurately set system parameters. In summary, the existing method for processing the service resources of the ESB system has the problems of poor universality, low instantaneity and low automation degree.
In view of this, as shown in fig. 1, an embodiment of the present invention provides a method for service resource processing, which may include the following steps:
step S101: the service resource usage of the enterprise service bus is monitored.
Specifically, the service resource usage of the enterprise service bus is monitored, for example, the heap memory usage, the central processing unit usage, the network connection usage, and the like of the enterprise service bus are monitored. The use of one or more service resources may be monitored in real time by constructing a Resource monitor.
Step S102: and under the condition that the use condition meets one or more preset early warning conditions, determining the use rate of the service resource, and searching a target management section to which the use rate belongs from one or more preset management sections corresponding to each early warning condition.
Specifically, in the case that the usage of the service resource meets one or more preset early warning conditions, the one or more early warning conditions are determined according to the type of the service resource and different early warning levels, for example: the early warning conditions for the utilization rate of the heap memory are utilization rate thresholds and the like under different early warning levels of more than 80%, 85%, 90% and the like; the early warning conditions under different early warning levels aiming at the utilization rate of the central processing unit are utilization rate thresholds exceeding 75%, 80%, 90% and the like; i.e. the situation that the service resource usage meets one or more pre-alarm conditions. It can be appreciated that different service resources can have different pre-warning conditions; and different treatments can be performed according to different pre-warning conditions.
Further, according to the current utilization rate of the service resource, searching a target management interval to which the utilization rate value belongs from one or more preset management intervals corresponding to each early warning condition. In one embodiment of the present invention, the embodiment of the present invention is illustrated by taking a service resource of a heap memory as an example; the early warning condition is provided with one or more corresponding preset management intervals; for example: the early warning condition of the heap memory is that the usage rate threshold value (80%) is exceeded, and a plurality of preset management intervals are: for example, the usage rate range corresponding to the interval 0 is [80% -84% ], the usage rate range corresponding to the interval 1 is [85% -95% ], the usage rate range corresponding to the interval 2 is [96% -99% ], and the like, and the fineness and flexibility of service resource management are improved by setting a plurality of preset management intervals.
Further, for example, the usage rate of the service resource of the current heap memory is 92%, a target management interval to which the usage rate value belongs is searched from a plurality of preset management intervals, and the target management interval is [85% -95% ], and then the service resource of the heap memory is further processed by using a resource processing strategy of the target management interval.
Step S103: and calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
Specifically, different target management intervals may correspond to different resource processing policies, and a method for processing service resources using multiple resource processing policies is described below.
The first method is as follows: the resource processing strategy comprises the following steps: the first resource regulation and control program is configured to shorten a free time length of one or more network connections, so that service resources occupied by the network connections are released in advance, and the calling one or more resource processing policies corresponding to the target management interval to process the service resources includes: and calling the first resource regulation program to generate a shortened idle time for the target management interval so as to release occupied service resources according to the shortened idle time.
Specifically, the resource processing strategy shortens the idle time of the network connection by using the first resource regulation and control program, so that the service resources occupied by the network connection are released in advance; for example: under the normal running condition of the system, the idle duration of one or more network connections is 600 seconds, and it can be understood that the idle network connections can improve the efficiency of network interaction, and occupy service resources such as heap memory, so that when the service resources are used under the condition of meeting the early warning condition, the network connections need to be correspondingly processed, for example: the idle duration of one or more network connections is shortened. For example: the method shortens the preset 600 seconds to 10 seconds, so that the resources can be released after the network connection relatively waits for 600 seconds, and the beneficial effect of releasing the occupied service resources in advance is achieved.
Further, there are two methods for generating the shortened spatial duration:
1) And under the condition that the maximum value of the target management interval is smaller than a resource saturation threshold, calculating the shortened idle time by using the utilization rate of the service resource, the maximum value of the target management interval, the minimum value of the target management interval, the preset idle time minimum value and the preset idle time default value.
Specifically, taking heap memory resources as service resources as an example, for example, the obtained service resources have a usage rate of 92%, a target management interval to which the service resources belong is [85%,95% ], and assuming that the resource saturation threshold is 96%, the maximum value of the target management interval is known to be 95%, that is, the maximum value of the target management interval is smaller than the resource saturation threshold; and assuming that the minimum value of the known target management interval is 85%, the preset minimum value of the idle time is 2 seconds, and the preset default value of the idle time is 600 seconds, the computing method included in the embodiment for computing the shortened idle time by using the usage rate of the service resource, the maximum value of the target management interval, the minimum value of the target management interval, the preset minimum value of the idle time and the preset default value of the idle time is as follows:
2s+(600s–2s)*(95%-92%)/(95%-85%)=181.4s;
Where s represents the unit of seconds.
It can be seen that the value obtained by generating the shortened idle time by using the first resource regulation program is 181.4s, and further using the configuration file or code to replace the original space time, so that the current network connection releases the occupied service resource in advance (compared with 600 seconds originally configured) according to 181.4 s.
2) And under the condition that the minimum value of the target management interval is larger than or equal to the resource saturation threshold, directly determining the preset minimum value of the idle time as the shortened idle time. For example: taking heap memory as a service resource for example, the usage rate of the acquired service resource is 96%, the target management interval to which the service resource belongs is [96%,99% ], and for example, the resource saturation threshold is 96%, that is, when the minimum value 96% of the target management interval is greater than or equal to the resource saturation threshold 96%, the preset idle duration minimum value (for example, 2 seconds) is directly determined as the shortened idle duration, that is, the shortened idle duration (that is, the preset idle duration minimum value) is replaced with the configuration file or the code by using the first resource regulation program, so that the current network connection releases the occupied service resource in advance (compared with 600 seconds originally configured) according to the idle duration of 2 seconds.
Therefore, different shortened idle time periods are used by judging the target management interval to which the current service resource use condition belongs, so that the flexibility and the fineness of service resource processing are improved. It will be appreciated that similar policy processing may be employed for use of other service resources such as CPU usage.
The second method is as follows: the resource processing strategy comprises the following steps: a second resource regulation program that reclaims resources occupied by one or more sessions; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the second resource regulation program to generate a session resource threshold for the target management interval, and recovering each session of which the occupied resource exceeds the session resource threshold so as to release the occupied service resource.
Specifically, the resource processing policy generates a session resource threshold using a second resource regulation program to reclaim each session whose occupied resources exceed the session resource threshold to release the occupied service resources.
Specifically, the second resource regulation program is called to generate a session resource threshold for the target management interval, wherein the generation of the session resource threshold includes: and calculating a session resource threshold by using the utilization rate of the service resource, the maximum value of the target management interval and the minimum value of the target management interval. Taking heap memory as a service resource for illustration: for example, the usage rate of the obtained service resource is 92%, and the target management interval to which the service resource belongs is [85%,95% ], preferably, the session occupation resource may be divided into a plurality of class intervals (for example, 8 class intervals), as shown in table 1, where MiB represents a memory unit.
TABLE 1
7 [1MiB,2MiB)
6 [2MiB,4MiB)
5 [4MiB,8MiB)
4 [8MiB,16MiB)
3 [16MiB,32MiB)
2 [32MiB,64MiB)
1 [64MiB,128MiB)
0 >=128MiB
Further, using the criterion= (95% -85%)/8 as a basic index, and using the basic index to represent the formula of the usage rate of the service resource as (85% + n criterion), for example, the current usage rate of the service resource is 92%, n can be calculated by using the formula, for example, the calculation result n is 6, and n is matched with 8 level intervals in table 1; obtaining a session resource threshold of 4MiB (i.e., the minimum value of the target management interval numbered 5); i.e. determining to reclaim (or reset) resources greater than or equal to 4MiB (session resource threshold); that is, for this target management section, a session resource threshold value 4MiB is calculated using 92% of the service resource usage rate, 95% of the target management section, and 85% of the target management section. Alternatively, after determining the session resource threshold, the resource values of the sessions exceeding the session resource threshold may be sorted from large to small, and then a set number (e.g., 50) of sessions may be selected for reclamation. I.e. to reclaim individual sessions whose occupied resources exceed said session resource threshold, to release the occupied service resources.
The third method is as follows: stopping a third resource regulation program for processing one or more service requests; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the third resource regulating program to directly return an abnormal response code to the received one or more new service requests, or calling the third resource regulating program to stop monitoring the service data of the one or more service requests in processing so as to ensure that the service resources occupied by service data scheduling are not increased.
Specifically, the third resource regulation program is utilized to directly return an exception corresponding code (e.g., code 503) to the received one or more service requests (e.g., HTTP requests); or to stop listening to the traffic data of the traffic request in one or more processes (e.g. to stop receiving new traffic requests through the listening network ports, or to stop listening to connections already established by the network ports so that the traffic data is no longer processed), so that the service resources occupied by the traffic data scheduling no longer increase.
A fourth method: sending a message for suspending the service request to a fourth resource regulation program of one or more service request terminals; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: calling the fourth resource regulation program to send a message for suspending the service request to one or more service request terminals; and stopping sending the service request by one or more service request terminals according to the received message for suspending the service request, so that the service resources occupied by the service request scheduling are not increased.
Specifically, the fourth resource regulation program is utilized to send a set message (message for suspending the service request) to the service request terminals, so that one or more service request terminals stop sending the service request according to the received message for suspending the service request, and the service resources occupied by the service request scheduling are not increased any more.
As shown in fig. 2, an embodiment of the present invention provides a service resource processing procedure, which may include the following steps:
step S201: and calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
Specifically, the specific description of invoking one or more resource processing policies corresponding to the target management interval to process the service resource is consistent with the description of step S103, and will not be repeated herein.
Step S202: and calling the first resource regulation program to generate a shortened idle time for the target management interval so as to release occupied service resources according to the shortened idle time.
Specifically, the description of this step is: the resource processing strategy comprises the following steps: the first resource regulation and control program is configured to shorten a free time length of one or more network connections, so that service resources occupied by the network connections are released in advance, and the calling one or more resource processing policies corresponding to the target management interval to process the service resources includes: and calling the first resource regulation program to generate a shortened idle time for the target management interval so as to release occupied service resources according to the shortened idle time.
And the generating the shortened idle time period comprises the following steps: and under the condition that the maximum value of the target management interval is smaller than a resource saturation threshold, calculating the shortened idle time by using the utilization rate of the service resource, the maximum value of the target management interval, the minimum value of the target management interval, the preset idle time minimum value and the preset idle time default value.
Or, the generating the shortened idle time further includes: and under the condition that the minimum value of the target management interval is larger than or equal to the resource saturation threshold, directly determining the preset minimum value of the idle time as the shortened idle time.
Step S203: and calling the second resource regulation program to generate a session resource threshold for the target management interval so as to recycle all sessions of which occupied resources exceed the session resource threshold and release the occupied service resources.
Specifically, the description of this step is: the resource processing strategy comprises the following steps: a second resource regulation program that reclaims resources occupied by one or more sessions; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the second resource regulation program to generate a session resource threshold for the target management interval, and recovering each session of which the occupied resource exceeds the session resource threshold so as to release the occupied service resource.
And, the generating a session resource threshold includes: and calculating a session resource threshold by using the utilization rate of the service resource, the maximum value of the target management interval and the minimum value of the target management interval.
Step S204: and calling the third resource regulating program to directly return an abnormal response code to the received one or more new service requests, or stopping monitoring the service data of the one or more service requests in processing so as to ensure that the service resources occupied by the service data scheduling are not increased.
Specifically, the description of this step is: the resource policy management method comprises the following steps: stopping a third resource regulation program for processing one or more service requests; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: and calling the third resource regulating program to directly return an abnormal response code to the received one or more new service requests, or calling the third resource regulating program to stop monitoring the service data of the one or more service requests in processing so as to ensure that the service resources occupied by service data scheduling are not increased.
Step S205: and calling the fourth resource regulation program to send a message for suspending the service request to one or more service request terminals.
Specifically, the description of this step is: the resource policy management method comprises the following steps: sending a message for suspending the service request to a fourth resource regulation program of one or more service request terminals; the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps: calling the fourth resource regulation program to send a message for suspending the service request to one or more service request terminals; and stopping sending the service request by one or more service request terminals according to the received message for suspending the service request, so that the service resources occupied by the service request scheduling are not increased.
Further, the step numbers of step S202 to step S205 are merely examples, and one or more steps included in step S202 to step S205 may be performed according to an unused application scenario; moreover, multiple steps may be performed concurrently.
Specifically, the detailed descriptions of step S202 to step S205 are identical to those of step S103, and are not repeated here. It can be understood that the first resource control program, the second resource control program, the third resource control program and the fourth resource control program can be independent code blocks according to application scenes or can be integrated in the same code block; the present invention is not particularly limited thereto.
As shown in fig. 3, an embodiment of the present invention provides an apparatus 300 for service resource processing, including: a monitoring resource module 301, a determination policy module 302, and a management resource module 303;
the monitoring resource module 301 is configured to monitor a service resource usage of the enterprise service bus;
the determining policy module 302 is configured to determine, when the usage condition meets one or more preset pre-warning conditions, a usage rate of the service resource, and find, from one or more preset management intervals corresponding to each of the pre-warning conditions, a target management interval to which the usage rate value belongs;
the management resource module 303 is configured to invoke one or more resource processing policies corresponding to the target management interval to process the service resource.
The embodiment of the invention also provides an electronic device for processing the service resources, which comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method provided by any of the embodiments described above.
The embodiment of the invention also provides a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method provided by any of the above embodiments.
Fig. 4 illustrates an exemplary system architecture 400 of a service resource handling method or apparatus to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various client applications, such as an electronic mall client application, a web browser application, a search class application, an instant messaging tool, a mailbox client, and the like, may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting various client applications including, but not limited to, smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server providing support for client applications used by the user with the terminal devices 401, 402, 403. The background management server can be attributed to an enterprise service bus, and the enterprise service bus can process each received service request, process service resource use conditions of the background management server and feed response results back to the terminal equipment.
It should be noted that, the method for processing service resources according to the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for processing service resources is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units involved in the embodiments of the present invention may be implemented in software, or may be implemented in hardware. The described modules and/or units may also be provided in a processor, e.g., may be described as: a processor includes a monitoring resource module, a determination policy module, and a management resource module. The names of these modules do not in any way limit the module itself, for example, a monitoring resource module may also be described as a "module that monitors usage of a service resource of an enterprise service bus".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: monitoring service resource use conditions of an enterprise service bus; under the condition that the use condition meets one or more preset early warning conditions, determining the use rate of the service resource, and searching a target management interval to which the use rate belongs from one or more preset management intervals corresponding to each early warning condition; and calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
The embodiment of the invention can monitor the service resource service condition of the enterprise service bus; under the condition that the use condition meets one or more preset early warning conditions, determining a target management section to which the use condition belongs from one or more preset management sections; and calling one or more resource processing strategies corresponding to the target management interval to process the service resource. The embodiment of the invention improves the real-time performance and the automation degree of service resource processing, and improves the refinement degree of service resource processing by processing the service resources through a plurality of preset management intervals and a plurality of corresponding resource processing strategies.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method of service resource handling, comprising:
monitoring service resource use conditions of an enterprise service bus;
under the condition that the use condition meets one or more preset early warning conditions, determining the use rate of the service resource, and searching a target management interval to which the use rate belongs from one or more preset management intervals corresponding to each early warning condition;
and calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the resource processing strategy comprises the following steps: a first resource regulation procedure for shortening the idle time of one or more network connections, so as to enable the service resources occupied by the network connections to be released in advance,
The step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps:
and calling the first resource regulation program to generate a shortened idle time for the target management interval so as to release occupied service resources according to the shortened idle time.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the generating the shortened idle time period comprises the following steps:
in case the maximum value of the target management interval is smaller than the resource saturation threshold,
and calculating the shortened idle time by using the utilization rate of the service resource, the maximum value of the target management interval, the minimum value of the target management interval, the preset idle time minimum value and the preset idle time default value.
4. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the generating the shortened idle time further includes:
and under the condition that the minimum value of the target management interval is larger than or equal to the resource saturation threshold, directly determining the preset minimum value of the idle time as the shortened idle time.
5. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the resource processing strategy comprises the following steps: a second resource regulation program that reclaims resources occupied by one or more sessions;
The step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps:
and calling the second resource regulation program to generate a session resource threshold for the target management interval, and recovering each session of which the occupied resource exceeds the session resource threshold so as to release the occupied service resource.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
the generating a session resource threshold includes:
and calculating a session resource threshold by using the utilization rate of the service resource, the maximum value of the target management interval and the minimum value of the target management interval.
7. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the resource policy management method comprises the following steps: stopping a third resource regulation program for processing one or more service requests;
the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps:
and calling the third resource regulating program to directly return an abnormal response code to the received one or more new service requests, or calling the third resource regulating program to stop monitoring the service data of the one or more service requests in processing so as to ensure that the service resources occupied by service data scheduling are not increased.
8. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the resource policy management method comprises the following steps: sending a message for suspending the service request to a fourth resource regulation program of one or more service request terminals;
the step of calling one or more resource processing strategies corresponding to the target management interval to process the service resource comprises the following steps:
calling the fourth resource regulation program to send a message for suspending the service request to one or more service request terminals; and stopping sending the service request by one or more service request terminals according to the received message for suspending the service request, so that the service resources occupied by the service request scheduling are not increased.
9. An apparatus for service resource handling, comprising: monitoring a resource module, determining a strategy module and managing the resource module;
the monitoring resource module is used for monitoring the service resource service condition of the enterprise service bus;
the determining policy module is configured to determine, when the usage condition meets one or more preset early warning conditions, a usage rate of the service resource, and find, from one or more preset management intervals corresponding to each of the early warning conditions, a target management interval to which the usage rate value belongs;
And the management resource module is used for calling one or more resource processing strategies corresponding to the target management interval to process the service resource.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-8.
11. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-8.
CN202211578098.XA 2022-12-06 2022-12-06 Service resource processing method and device Pending CN116032737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211578098.XA CN116032737A (en) 2022-12-06 2022-12-06 Service resource processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211578098.XA CN116032737A (en) 2022-12-06 2022-12-06 Service resource processing method and device

Publications (1)

Publication Number Publication Date
CN116032737A true CN116032737A (en) 2023-04-28

Family

ID=86075146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211578098.XA Pending CN116032737A (en) 2022-12-06 2022-12-06 Service resource processing method and device

Country Status (1)

Country Link
CN (1) CN116032737A (en)

Similar Documents

Publication Publication Date Title
CN107534570B (en) Computer system, method and medium for virtualized network function monitoring
CN109936613B (en) Disaster recovery method and device applied to server
CN112445857A (en) Resource quota management method and device based on database
CN109428926B (en) Method and device for scheduling task nodes
US20200210293A1 (en) Application health monitoring and automatic remediation
CN114116173A (en) Method, device and system for dynamically adjusting task allocation
CN111831503B (en) Monitoring method based on monitoring agent and monitoring agent device
CN112448987A (en) Fusing degradation triggering method and system and storage medium
CN113760642A (en) Monitoring processing method and device
CN113742389A (en) Service processing method and device
CN110336884B (en) Server cluster updating method and device
CN116961918A (en) Token acquisition method and device
CN116032737A (en) Service resource processing method and device
CN115543416A (en) Configuration updating method and device, electronic equipment and storage medium
CN110888770B (en) Method and device for transmitting information
CN110955579A (en) Ambari-based large data platform monitoring method
CN114374657A (en) Data processing method and device
CN109831385B (en) Message processing method and device and electronic equipment
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN112783639B (en) Traffic scheduling method and device applied to service restart
CN113778780B (en) Application stability determining method and device, electronic equipment and storage medium
CN113778730B (en) Service degradation method and device for distributed system
CN110852537A (en) Service quality detection method and device
CN113778657B (en) Data processing method and device
CN110262756B (en) Method and device for caching data

Legal Events

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